# $Id: PKGBUILD 167201 2012-09-27 19:22:41Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=quota-tools
pkgver=4.01
pkgrel=1
#epoch=1
pkgdesc="Tools to manage kernel-level quotas in Linux"
arch=('i686' 'x86_64' sh4)
url="http://sourceforge.net/projects/linuxquota/"
license=('GPL' 'BSD')
depends=('e2fsprogs')
backup=('etc/warnquota.conf' 'etc/quotatab' 'etc/quotagrpadmins')
options=('!emptydirs')
source=(http://downloads.sourceforge.net/sourceforge/linuxquota/quota-${pkgver}.tar.gz)
sha1sums=('64d2ab8b039cfea1aa4bd9e77e8c373488a7f0bf')

build() {
  cd "${srcdir}/${pkgname}"
  ./configure --prefix=/usr --sysconfdir=/etc
  make
}

package() {
  cd "${srcdir}/${pkgname}"
  make ROOTDIR="${pkgdir}" install
  install -d "${pkgdir}/usr/share/licenses/${pkgname}"
  head -33 quota.c > "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

# remove conflicts with glibc
  rm "${pkgdir}"/usr/include/rpcsvc/rquota.{h,x}
}
